<?php
class Sms extends Controller 
{
	function Sms()
	{
		parent::Controller();	
	}
	
	function index()
	{
		$this->load->view('sms/home');
	}
	
	function send()
	{
		$this->load->library('clickatellsms');
		
		$this->clickatellsms->setup(
			array(
				'username' => 'xtrafile',
				'password' => 'iksnilG9',
				'api_id' => '3079644',
			)
		);
		
		$to = $this->input->post('to');
		$msg = $this->input->post('msg');
		
		$data['result'] = $this->clickatellsms->send($to, $msg);
		
		$this->load->view('sms/send', $data);
	}
}
?>